package FileDemo;

import java.io.File;

public class FileListFilesDemo {
    public static void main(String[] args) {
        File file = new File("./src/resources/abc");
        File[] dirs = file.listFiles();
        for (File dir : dirs) {
            if (dir.isDirectory()) {
                System.out.println(dir.getName() + "是文件夹");
            } else {
                System.out.println(dir.getName() + "不是文件夹");
            }
        }
    }
}
